import React from 'react';
import { FriendsO, WapHomeO, ChatO, ManagerO } from '@react-vant/icons'
// import { useNavigate } from "react-router-dom";
const Footer = () => {
    const navigate = React.$router.useNavigate();
    let location =React.$router.useLocation();
    let name=location.pathname
    const [activeValue,setActiveValue]=React.useState(name)
    const skip=(active)=>{
            navigate(active); 
    }
    return (
        <>
            <React.$vant.Tabbar  activeColor='#f44336' inactiveColor='#000' onChange={skip} value={activeValue}>
                <React.$vant.Tabbar.Item name='/' icon={<WapHomeO  />}>首页</React.$vant.Tabbar.Item>
                <React.$vant.Tabbar.Item name='/lease/index' icon={<ChatO  />}>租车</React.$vant.Tabbar.Item>
                <React.$vant.Tabbar.Item name='/category/index' icon={<FriendsO />}>话题</React.$vant.Tabbar.Item>
                <React.$vant.Tabbar.Item name='/business/index' icon={<ManagerO  />}>我的</React.$vant.Tabbar.Item>
            </React.$vant.Tabbar>
        </>
    )
}

export default Footer;